@extends('layouts.app')
@include('free.sidebar')
@section('content')
    <div class="content">
        <div class="row custom-invoice">
            <div class="row" style="margin: 0 10px 20px 0;">
                <span style="font-weight: bold"> {{ $good->name }}</span> 的解锁商品列表
            </div>
            <a class="btn btn-success" href="{{ route('admin.free.unlock_good.create', ['id' => $id, 'type' => $type]) }}">添加解锁商品</a>
            <br />
            <br />
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>所属门店</th>
                    <th>类别</th>
                    <th>商品名</th>
                    <th>解锁金额</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $item)
                    <tr>
                        <td>{{ $item->shop }}</td>
                        <td>{{ $item->category }}</td>
                        <td>{{ $item->name }}</td>
                        <td>{{ $item->money/100 }}</td>
                        <td>
                            <a class="btn btn-primary btn-xs delete-confirm" data-href="{{ route('admin.free.unlock_good.delete', ['id' => $item->id]) }}"><i class="fa fa-trash-o"></i> 删除</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
@endsection
